home *** CD-ROM | disk | FTP | other *** search
/ Light ROM Gold / Light ROM Gold.iso / arexx / load_pro.lwm next >
Text File  |  1993-02-12  |  2KB  |  72 lines

  1. /* CMD: Load Project
  2.  *
  3.  * This is a Lightwave Modeler Macro that will load a project that
  4.  * was saved with the "Save_Project.lwm" macro.  It will load all objects
  5.  * up into seperate layers again.
  6.  *
  7.  * 2/94  Jason Mussetter
  8.  */
  9.  
  10.  
  11.  
  12.    mxx="LWModelerARexx.port"
  13.    signal on error
  14.    signal on syntax
  15.    mxx_add = addlib(mxx,0)
  16.    call main
  17.    if (mxx_add) then call remlib(mxx)
  18.    exit
  19.  
  20.    syntax:
  21.    error:
  22.    t=Notify(1,'Rexx Script Error','@'ErrorText(rc), 'Line 'SIGL)
  23.    if (mxx_add) then call remlib(mxx)
  24.    exit
  25.  
  26. main:   
  27.  
  28. /*  We'll ask the user for the Prefix of the Project's name.  */
  29.  
  30.    CALL REQ_BEGIN("Load Project")
  31.  
  32.        Prj_Prfx = REQ_ADDCONTROL("Project Prefix", string, 50)
  33.        Num_Layr = REQ_ADDCONTROL("Number of Layers",number,0)
  34.     CALL REQ_POST()
  35.     If result = 0 then return
  36.     ProjectPrifix = REQ_GETVAL(Prj_Prfx)
  37.     LayerCount = REQ_GETVAL(Num_Layr)
  38.        
  39.    CALL REQ_END()
  40.  
  41.    Cont = NOTIFY(3,"All project files are there?")
  42.    If result = 0 then return 
  43.  
  44.  
  45. /* After we have the Project's name prefix, we'll load each layer. */
  46.  
  47.    CALL SETLAYER(1)
  48.    if LayerCount > 0 then CALL LOAD(ProjectPrifix||"1.lwob")
  49.       
  50.    CALL SETLAYER(2)
  51.    if LayerCount > 1 then CALL LOAD(ProjectPrifix||"2.lwob")
  52.    
  53.    CALL SETLAYER(3)
  54.    if LayerCount > 2 then CALL LOAD(ProjectPrifix||"3.lwob")
  55.    
  56.    CALL SETLAYER(4)
  57.    if LayerCount > 3 then CALL LOAD(ProjectPrifix||"4.lwob")
  58.  
  59.    CALL SETLAYER(5)
  60.    if LayerCount > 4 then CALL LOAD(ProjectPrifix||"5.lwob")
  61.  
  62.    CALL SETLAYER(6)
  63.    if LayerCount > 5 then CALL LOAD(ProjectPrifix||"6.lwob")
  64.  
  65.    CALL SETLAYER(7)
  66.    if LayerCount > 6 then CALL LOAD(ProjectPrifix||"7.lwob")
  67.  
  68.    CALL SETLAYER(8)
  69.    if LayerCount > 7 then CALL LOAD(ProjectPrifix||"8.lwob")
  70.  
  71. return
  72.